const schedule = require('node-schedule');

const {likesIpTable,readingTimesIpTable} = require('../schemas/index');

// 每天凌晨 0点0分30秒 清空ip表
const resetIpTableTask = () => {
    //每分钟的第30秒定时执行一次:
    schedule.scheduleJob('30 0 0 * * *', () => {
        likesIpTable.remove({});
        readingTimesIpTable.remove({});
    });
}

// resetIpTableTask();